<?php
class Paciente extends Zend_Db_Table {
	
	protected $_name = 'clientes';
	
	public function getNextId(){  
		$select = $this->select();
		$select->from($this, 'nextval(\'seq_clientes\') as nextid ,max(id) as lastid');
		$row = $this->fetchRow($select)->toArray();
		return $row["nextid"];
    } 
}
?>